import type { Metadata } from "next";
import { Toaster } from 'react-hot-toast';
import { ClientWalletProvider } from '../components/ClientWalletProvider';
import { LanguageProvider } from '../contexts/LanguageContext';
import { BottomControls } from '../components/BottomControls';
import { Web3Provider } from '../lib/Web3Provider';
import "./globals.css";
import { Inter, Press_Start_2P } from "next/font/google";

// 字体：正文使用 Inter 提升可读性；像素元素使用 Press Start 2P
const fontBody = Inter({ subsets: ["latin"], variable: "--font-body" });
const fontPixel = Press_Start_2P({ subsets: ["latin"], weight: "400", variable: "--font-pixel" });

export const metadata: Metadata = {
  title: "c4pad.fun - x-layer  Launchpad",
  description: "A fun launchpad for XLayer tokens",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
  <body className={`${fontBody.variable} ${fontPixel.variable} antialiased`}>
        <LanguageProvider>
          <Web3Provider>
            <ClientWalletProvider>
              <BottomControls />
              {children}
              <Toaster position="top-right" />
            </ClientWalletProvider>
          </Web3Provider>
        </LanguageProvider>
      </body>
    </html>
  );
}
